#!/bin/bash
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions


cd cufflink

for i in cufflink_CG cufflink_DiagPCG cufflink_SmAPCG cufflink_CG_Parallel cufflink_DiagPCG_Parallel cufflink_SmAPCG_Parallel
do
	cd $i

	for j in N10 N50 N100 N500 N1000 N2000
		do
		   cd $j
			pwd
			rm -r 1 log.* processor*
				cd constant/polyMesh 
				rm boundary faces neighbour owner points
				cd ../..
		   cd ..
	done
	
	cd ..
done

cd ../OpenFOAM

for i in CG DPCG GAMG DPCG-parallel4 DPCG-parallel6 GAMG6
do
	cd $i

	for j in N10 N50 N100 N500 N1000 N2000
		do
		   cd $j
			pwd
			rm -r 1 processor* log.*
				cd constant/polyMesh 
				rm boundary faces neighbour owner points
				cd ../..

		   cd ..
	done
	
	cd ..
done


cd ..




#printf "Starting simpleTracerFoam on Rei1000 \n"
#date
#    runApplication decomposePar
#    runParallel simpleTracerFoam 8 system/machines
 #   runApplication reconstructPar
#date
